package com.dingding.manager.modules.dirver.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dingding.manager.common.beans.VehiCheckReason;
import com.dingding.manager.modules.dirver.dto.ReqDriverManageAuditDTO;
import com.dingding.manager.modules.dirver.dto.ResDriverManageAuditDTO;
import com.dingding.manager.modules.dirver.service.IDriverManageAuditService;

/**
 * 
 * @Description: 司机审核管理
 * @author ligang
 * @date 2016年12月7日 下午8:56:36
 * @version
 */
@Controller
@RequestMapping("/driver/manage")
public class DriverManageAuditController {
	
	@Resource(name = "driverManageAuditService")
	private IDriverManageAuditService driverManageAuditService;
 
	/**
	 * 
	 * @Description: 审核管理修改状态
	 * @author ligang
	 * @param     参数说明
	 * @return          返回类审核管理未通过型 
	 */
	@RequestMapping (value="/v1/audit",method=RequestMethod.POST)
	@ResponseBody
	public ResDriverManageAuditDTO driverManageAuditState(ReqDriverManageAuditDTO reqDriverManageAuditDTO){
		ResDriverManageAuditDTO resDriverManageAuditDTO = driverManageAuditService.updateDriverManageState(reqDriverManageAuditDTO);
		return resDriverManageAuditDTO;
	}
	
	/**
	 * 
	 * @Description: 审核管理未通过返回原因
	 * @author ligang
	 * @param  参数说明
	 * @return 返回类型
	 */
	@RequestMapping(value="/v2/no/audit")
	@ResponseBody
	public List<VehiCheckReason> driverManageNotAudit(){
		List<VehiCheckReason> vehiCheckReasons = driverManageAuditService.driverManageNotAudit();
		return vehiCheckReasons;
	}
	
}
